package com.bosssoft.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced//赋予RestTemplate负载均衡的能力 由于80018002都是CLOUD-PAYMENT-SERVICE下的服务，80并不知道要找哪一个
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
